package model

import (
	"gorm.io/gorm"
	"time"
)

type Video struct {
	Id        uint           `gorm:"column:id;type:bigint(20) UNSIGNED;primaryKey;not null;" json:"id"`
	Name      string         `gorm:"column:name;type:varchar(255);comment:名称;not null;" json:"name"`   // 名称
	Url       string         `gorm:"column:url;type:varchar(255);comment:地址;not null;" json:"url"`     // 地址
	CType     uint           `gorm:"column:c_type;type:bigint(20);comment:类型;not null;" json:"c_type"` // 类型
	CreatedAt time.Time      `gorm:"column:created_at;type:datetime;not null;default:CURRENT_TIMESTAMP;" json:"created_at"`
	UpdatedAt time.Time      `gorm:"column:updated_at;type:datetime;not null;default:CURRENT_TIMESTAMP;" json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime;default:NULL;" json:"deleted_at"`
}

func (Video) TableName() string {
	return "video"
}
